import request from '@/utils/request'

// 查询合同信息列表
export function listInformation(query) {
  return request({
    url: '/biz/contractInformation/list',
    method: 'post',
    data: query
  })
}

// 查询合同信息详细
export function getInformation(contractId) {
  return request({
    url: '/biz/contractInformation/' + contractId,
    method: 'get'
  })
}

// 新增合同信息
export function addInformation(data) {
  return request({
    url: '/biz/contractInformation',
    method: 'post',
    data: data
  })
}

// 修改合同信息
export function updateInformation(data) {
  return request({
    url: '/biz/contractInformation',
    method: 'put',
    data: data
  })
}

// 删除合同信息
export function delInformation(contractId) {
  return request({
    url: '/biz/contractInformation/' + contractId,
    method: 'delete'
  })
}


export function approval(data) {
  return request({
    url: '/biz/approval',
    method: 'post',
    data: data
  })
}

// 合同进度
export function approvalProcess(id) {
  return request({
    url: `/biz/contractInformation/approvalProcess/${id}`,
    method: 'get',
  })
}
// 复制合同
export function contractInformationCopy(id) {
  return request({
    url: `/biz/contractInformation/copy/${id}`,
    method: 'post',
  })
}

// 生成合同编号
export function getContractNumber(type) {
  return request({
    url: '/biz/contractInformation/getContractNumber/' + type,
    method: 'get'
  })
}
// 导入
export function importContract(data) {
  return request({
    url: '/biz/contractInformation/import',
    method: 'post',
    data: data
  })
}
